std::vector::capacity

From Cppreference

Jump to: navigation, search
​size_type capacity() const;

Returns the number of elements that the container has currently allocated space for.

Contents

Parameters

(none)

Return value

capacity of the currently allocated storage

Complexity

constant

See also

size
returns the number of elements
(public member function)
reserve
reserves storage
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages